package com.sinoglobal.dumping.base;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

/**
 * @title: Dumpling_NetWorkUtil.java
 * @package com.sinoglobal.sinobase.util
 * @description: 网络工具类
 * @author shenbingkai
 * @date 2015-3-4 上午9:47:30
 */
public class Dumpling_NetWorkUtil {
	public static final int NONE = 0;
	public static final int WIFI = 1;
	public static final int MOBILE = 2;

	/**
	 * @author shenbingkai
	 * @methods getNetWork
	 * @description 判断有无网络
	 * @date 2015-3-4 上午11:24:04
	 * @param context
	 * @return 参数说明
	 */
	public static boolean getNetWork(Context context) {
		ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo netinfo = cm.getActiveNetworkInfo();
		return null == netinfo;
	}
}